import { relations } from 'drizzle-orm/relations'
import { user, blog } from './schema'

export const userManyBlogRelations = relations(user, ({many}) => ({
    userBlogs: many(blog),
}))
  
export const commentsRelations  = relations(blog, ({one}) => ({
    author: one(user, {
        fields: [blog.userId],
        references:[user.id]
    }),
  }))